package com.jar.netty_demo.Netty.buf;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

public class NettyByteBuf01 {
    public static void main(String[] args) {

	    ByteBuf buffer = Unpooled.buffer(10);
	    for (int i = 0; i < 10; i++) {
		    buffer.writeByte(i);
	    }
	    System.out.println(buffer.capacity());

	    for (int i = 0; i < buffer.readableBytes(); i++) {
		    System.out.println(buffer.readByte());
	    }

    }
}
